#ifndef ITERADORUB_H
#define ITERADORUB_H

#include "arbolub.h"

template<size_t D, size_t K>
class IteradorUB
{
    public:
        IteradorUB(ArbolUB<D, K>& arbol, Point<D> min, Point<D> max);
        void start(std::function<void(Point<D>)> function);

    private:
        void recursive(Node<ZPoint<D*K>, RegistroUB<D, K> >& nodo, ZPoint<D*K> upperLimit,
                       std::function<void(Point<D>)> function);

        ArbolUB<D, K>& arbol;

        ZCurve<D, K> zCurve;
        ZPoint<D*K> zMin;
        ZPoint<D*K> zCur;
        ZPoint<D*K> zMax;
};

#endif // ITERADORUB_H
